<template>
  <div>
    <el-container>
      <el-aside width="width"><Silder :isClosed="isClosed" /></el-aside>
      <el-container>
        <el-header class="layout"><Header @getClosed="getClosed" /></el-header>
        <el-main class="layout"><Content /></el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Header from "@/components/Header";
import Silder from "@/components/Silder";
import Content from "@/components/Content";
export default {
  name: "LLayout",
  components: { Header, Silder, Content },
  data() {
    return {
      isClosed: false,
      width: "400px",
    };
  },
  created() {
    this.$router.push("/index");
  },
  methods: {
    getClosed(data) {
      this.isClosed = data;
    },
  },
};
</script>

<style lang="less" scoped>
.layout {
  margin: 0;
  margin-bottom: 3px;
  padding: 0;
}
</style>
